package com.gl.emms.whale.ui;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.gl.emms.whale.R;
import com.gl.emms.whale.app.WhaleMonitorActivity;

public class ReportRepairActivity extends WhaleMonitorActivity implements
OnClickListener{
	private Button titleBackBtn;
	private Button repairButton;;
	private Button repairCallButton;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);// 去掉标题栏
		setContentView(R.layout.activity_reportrepair);
		titleBackBtn = (Button)findViewById(R.id.TitleBackBtn); 
		titleBackBtn.setOnClickListener(this);
		repairButton = (Button)findViewById(R.id.btn_report); 
		repairButton.setOnClickListener(this);
		repairCallButton = (Button)findViewById(R.id.btn_report_by_phone); 
		repairCallButton.setOnClickListener(this);
		 
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.btn_report:

			break;
		case R.id.btn_report_by_phone:
			//用intent启动拨打电话  
			Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:010-82793797"));  
			startActivity(intent);  
			break;
		case R.id.TitleBackBtn:
			//用intent启动拨打电话  
			KeyEvent newEvent = new KeyEvent(KeyEvent.ACTION_DOWN,  
					KeyEvent.KEYCODE_BACK);
			finish();
			break;
		default:
			break;
		}
	}

}
